import Cookies from 'js-cookie'
// 将token存在cookies里
const TokenKey = 'token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
const name = 'name'

export function getName() {
  return Cookies.get(name)
}

export function setName(val) {
  return Cookies.set(name, val)
}

export function removeName() {
  return Cookies.remove(name)
}
const avatar = 'avatar'

export function getAvatar() {
  return Cookies.get(avatar)
}

export function setAvatar(avatarImg) {
  return Cookies.set(avatar, avatarImg)
}

export function removeAvatar() {
  return Cookies.remove(avatar)
}

